Optimal. Leaf size=146 \[ -\frac {6 d^3 \text {Li}_3\left (-e^{i (a+b x)}\right )}{b^4}+\frac {6 d^3 \text {Li}_3\left (e^{i (a+b x)}\right )}{b^4}+\frac {6 i d^2 (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^2 (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^3}-\frac {6 d (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {(c+d x)^3 \csc (a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 146, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4410, 4183, 2531, 2282, 6589} \[ \frac {6 i d^2 (c+d x) \text {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^2 (c+d x) \text {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^3}-\frac {6 d^3 \text {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^4}+\frac {6 d^3 \text {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^4}-\frac {6 d (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {(c+d x)^3 \csc (a+b x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 2531
Rule 4183
Rule 4410
Rule 6589
Rubi steps
\begin {align*} \int (c+d x)^3 \cot (a+b x) \csc (a+b x) \, dx &=-\frac {(c+d x)^3 \csc (a+b x)}{b}+\frac {(3 d) \int (c+d x)^2 \csc (a+b x) \, dx}{b}\\ &=-\frac {6 d (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {(c+d x)^3 \csc (a+b x)}{b}-\frac {\left (6 d^2\right ) \int (c+d x) \log \left (1-e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (6 d^2\right ) \int (c+d x) \log \left (1+e^{i (a+b x)}\right ) \, dx}{b^2}\\ &=-\frac {6 d (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {(c+d x)^3 \csc (a+b x)}{b}+\frac {6 i d^2 (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^2 (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^3}-\frac {\left (6 i d^3\right ) \int \text {Li}_2\left (-e^{i (a+b x)}\right ) \, dx}{b^3}+\frac {\left (6 i d^3\right ) \int \text {Li}_2\left (e^{i (a+b x)}\right ) \, dx}{b^3}\\ &=-\frac {6 d (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {(c+d x)^3 \csc (a+b x)}{b}+\frac {6 i d^2 (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^2 (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^3}-\frac {\left (6 d^3\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^4}+\frac {\left (6 d^3\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^4}\\ &=-\frac {6 d (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac {(c+d x)^3 \csc (a+b x)}{b}+\frac {6 i d^2 (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^2 (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^3}-\frac {6 d^3 \text {Li}_3\left (-e^{i (a+b x)}\right )}{b^4}+\frac {6 d^3 \text {Li}_3\left (e^{i (a+b x)}\right )}{b^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.17, size = 311, normalized size = 2.13 \[ -\frac {b^3 c^3 \csc (a+b x)+3 b^3 c^2 d x \csc (a+b x)+3 b^3 c d^2 x^2 \csc (a+b x)+b^3 d^3 x^3 \csc (a+b x)-3 b^2 c^2 d \log \left (1-e^{i (a+b x)}\right )+3 b^2 c^2 d \log \left (1+e^{i (a+b x)}\right )-6 b^2 c d^2 x \log \left (1-e^{i (a+b x)}\right )+6 b^2 c d^2 x \log \left (1+e^{i (a+b x)}\right )-3 b^2 d^3 x^2 \log \left (1-e^{i (a+b x)}\right )+3 b^2 d^3 x^2 \log \left (1+e^{i (a+b x)}\right )-6 i b d^2 (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )+6 i b d^2 (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )+6 d^3 \text {Li}_3\left (-e^{i (a+b x)}\right )-6 d^3 \text {Li}_3\left (e^{i (a+b x)}\right )}{b^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.55, size = 669, normalized size = 4.58 \[ -\frac {2 \, b^{3} d^{3} x^{3} + 6 \, b^{3} c d^{2} x^{2} + 6 \, b^{3} c^{2} d x + 2 \, b^{3} c^{3} - 6 \, d^{3} {\rm polylog}\left (3, \cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - 6 \, d^{3} {\rm polylog}\left (3, \cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + 6 \, d^{3} {\rm polylog}\left (3, -\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + 6 \, d^{3} {\rm polylog}\left (3, -\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - {\left (-6 i \, b d^{3} x - 6 i \, b c d^{2}\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - {\left (6 i \, b d^{3} x + 6 i \, b c d^{2}\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - {\left (-6 i \, b d^{3} x - 6 i \, b c d^{2}\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - {\left (6 i \, b d^{3} x + 6 i \, b c d^{2}\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + b^{2} c^{2} d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) - 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) - 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) - 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) - 3 \, {\left (b^{2} d^{3} x^{2} + 2 \, b^{2} c d^{2} x + 2 \, a b c d^{2} - a^{2} d^{3}\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right )}{2 \, b^{4} \sin \left (b x + a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{3} \cos \left (b x + a\right ) \csc \left (b x + a\right )^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.09, size = 433, normalized size = 2.97 \[ -\frac {6 i d^{3} \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{3}}+\frac {6 d^{2} c \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {6 d^{2} c \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{3}}-\frac {6 d^{2} c \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b^{2}}-\frac {6 d^{2} c \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{b^{3}}-\frac {6 d \,c^{2} \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 d^{3} a^{2} \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}-\frac {6 d^{3} \polylog \left (3, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}+\frac {6 d^{3} \polylog \left (3, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}+\frac {12 d^{2} c a \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {6 i d^{2} c \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {6 i d^{2} c \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x^{2}}{b^{2}}+\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a^{2}}{b^{4}}-\frac {2 i \left (d^{3} x^{3}+3 c \,d^{2} x^{2}+3 c^{2} d x +c^{3}\right ) {\mathrm e}^{i \left (b x +a \right )}}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}+\frac {3 d^{3} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b^{2}}-\frac {3 d^{3} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a^{2}}{b^{4}}+\frac {6 i d^{3} \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.56, size = 1770, normalized size = 12.12 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\cos \left (a+b\,x\right )\,{\left (c+d\,x\right )}^3}{{\sin \left (a+b\,x\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right )^{3} \cos {\left (a + b x \right )} \csc ^{2}{\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________